/**
 * @Title: UserDao
 * @Package cn.com.yiqi.wsc.dao.user
 * @Description: TODO
 * Copyright: Copyright (c) 2016
 * Company: 成都壹柒互动科技有限公司
 * @author 会员系统组-胥钰淋
 * @date 2017/2/9 18:22
 * @version V1.0
 */
package cn.com.yiqi.wsc.dao.user;

import cn.com.artemis.framework.base.commons.persistence.CrudDao;
import cn.com.yiqi.wsc.dao.user.criteria.UserCriteria;
import cn.com.yiqi.wsc.entity.user.User;
import cn.com.yiqi.wsc.entity.user.UserEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 会员系统组-胥钰淋
 * @ClassName: UserDao
 * @Description: TODO
 * @date 2017/2/9 18:22
 */
@Repository
public interface UserDao extends CrudDao<User> {


    /**
     * 用户分页列表查询
     *
     * @param criteria
     * @return
     */
    List<User> pageList(UserCriteria criteria);

    /**
     * 根据用户名获取用户
     *
     * @param username
     * @return
     */
    UserEntity getUserPasswordByUsername(@Param("username") String username);


    /**
     * 根据用户名获取用户
     *
     * @param username
     * @return
     */
    User getUserByUsername(@Param("username") String username);

    /**
     * 获取用户列表orgId
     *
     * @param orgId
     * @return
     */
    List<User> getUserByOrgId(@Param("orgId") Integer orgId);


    /**
     * 根据手机获取用户
     *
     * @param username
     * @return
     */
    User getUserByMobile(String username);
}
